# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=fakemail
pkgver=1.0
pkgrel=7
groups=('blackarch' 'blackarch-misc')
pkgdesc='Fake mail server that captures e-mails as files for acceptance testing.'
arch=('any')
url='http://sourceforge.net/projects/fakemail/'
license=('GPL')
depends=('python2')
source=("http://downloads.sourceforge.net/project/fakemail/fakemail-python/1.0/fakemail-python-$pkgver.tar.gz")
sha512sums=('8b1db3dcaa01b8cdb941624dd0ee0167c6effbde419b31c9877490b0138554871450fd36b8ccc6de9c2fff9a8cc66ea66300f5489ea7e48d4e53f5bd5557654f')

prepare() {
  cd "fakemail-python-$pkgver"

  sed -i 's|env python$|env python2|' *.py
}

package() {
  cd "fakemail-python-$pkgver"

  python2 setup.py build install --root="$pkgdir"

  mv "$pkgdir/usr/bin/fakemail.py" "$pkgdir/usr/bin/$pkgname"
}

